package b4.util
{
	import flash.system.ApplicationDomain;
	
	public class Resource
	{
		public static var appDomains:Object = new Object();
		
	    public static function getClassByName(name:String):Class
	    {
	    	for (var appStr:String in appDomains)
	    	{
	    		var appDomain:ApplicationDomain = appDomains[appStr];
	    		try
	    		{
	    			return appDomain.getDefinition(name) as Class;
	    		}
		    	catch (e:Error)
		    	{
		    		
		    	}	
	    	}
	    	return null;
	    }
	    
	}
}